<?php
/*
* Author: Nguyen Hai Nam
* Plugin: TabAdminDefaultPlugin
* Desc	: Introduce pick.vn and sidle pic
* Date	: 12/12/2011
*/
class TabAdminDefaultPlugin extends Pick_Core_Plugin{
	
	function TabAdminDefaultPlugin(){
		parent::Pick_Core_Plugin();
		$this->namePlugin = "tabadmindefault";
		$this->descriptionPlugin = "This is tab admin default for admin system";
	}
	public function getContent(){
		
		$modules = new Pick_Core_Modules();
		
		$objectModuleTab = '';
		$objectCurrent = $modules->getObjects(1, " code = '".$this->op."'");
		if($objectCurrent){
			$objectCurrent = $objectCurrent['data'][0];
			$objectModuleTab = $modules->getObjects(1, "(cid = '".$objectCurrent->getField('id')."' OR id = '".$objectCurrent->getField('cid')."' OR id = '".$objectCurrent->getField('id')."') AND status = 1", array("position" => "ASC"));
		}
		if($objectModuleTab){
			$objectModuleTab = $objectModuleTab['data'];
		}
		$this->template->assign("objectCurrent", $objectCurrent);
		$this->template->assign("objectModuleTab", $objectModuleTab);	
		
	}
}